#ifndef UTILITIES_H
#define UTILITIES_H

#include <vector>
#include "GlobalVariables.h"
#include <time.h>

using std::vector;

//Standalone functions which are used throughout various classes.

/*! \brief Function which returns a specific value for delta_x and delt_y dependant on the direction passed into the it.
	
	This function is usually called when calculating which grid elements must be checked when an object is facing in a specific direction.
	It provides an efficient method of element checking when several grid elements must be checked in one function.
*/
vector<int> delta(Direction direction);
//! \brief Checks whether a given direction is contained in a vector containing a list of multiple directions
//! This function proved particularly useful during routing of monsters
bool contains(vector<Direction> list, Direction value);

/*! \brief A function which takes in two time values and calculates the time difference between them
	
	Has several applications including time limitting innefficient functions which would otherwise cause large delays when 
	performing long calculations.

	During debugging this function also proves useful for testing the efficiency of specific areas of the code.
*/
double diffclock(clock_t clock1,clock_t clock2);

//! \brief Used to calculate an angle of rotation for a given input direction.
//! Mainly used for rotation of Bitmaps 
float directionToAngle(Direction dir);

#endif